package com.leyou.gateway.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author xiuer
 * @description 授权中心客户端
 * @create 2019/7/11 9:16
 */
@FeignClient("auth-service")
public interface AuthClient {

    /**
     * 微服务授权令牌
     *
     * @param id     微服务id
     * @param secret 微服务注册密码
     * @Return 返回令牌
     */
    @GetMapping("authorization")
    String authorize(@RequestParam("id") Long id, @RequestParam("secret") String secret);
}
